import { createContext, useContext } from 'react'
import Login from './Login.Store'
import User from './User.Store'
import Channels from './Channels.Store'
class RootStore {
  constructor() {
    this.login = new Login()
    this.User=new User()
    this.Channels=new Channels()
  }
}

const StoresContext = createContext(new RootStore())
export const useStore = () => useContext(StoresContext)